<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>农场展示 - 智慧农业信息管理系统</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
        }
        
        .navbar {
            background: rgba(255, 255, 255, 0.95) !important;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .navbar-brand {
            font-weight: bold;
            color: #667eea !important;
            font-size: 1.5rem;
        }
        
        /* Hero Section */
        .hero-section {
            background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), 
                        url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=1200') center/cover;
            color: white;
            padding: 120px 0;
            text-align: center;
            margin-bottom: 50px;
            position: relative;
        }
        
        .hero-section h1 {
            font-size: 3.5rem;
            font-weight: bold;
            margin-bottom: 20px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            animation: fadeInDown 1s;
        }
        
        .hero-section p {
            font-size: 1.5rem;
            margin-bottom: 30px;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
            animation: fadeInUp 1s;
        }
        
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Section Styles */
        .section-title {
            text-align: center;
            margin-bottom: 50px;
            color: white;
        }
        
        .section-title h2 {
            font-size: 2.5rem;
            font-weight: bold;
            margin-bottom: 15px;
            position: relative;
            display: inline-block;
        }
        
        .section-title h2::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 4px;
            background: linear-gradient(to right, #667eea, #764ba2);
            border-radius: 2px;
        }
        
        /* Feature Cards */
        .feature-card {
            background: white;
            border-radius: 15px;
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            text-align: center;
        }
        
        .feature-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 40px rgba(0,0,0,0.2);
        }
        
        .feature-icon {
            font-size: 3rem;
            margin-bottom: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        .feature-card h4 {
            color: #333;
            margin-bottom: 15px;
            font-weight: bold;
        }
        
        .feature-card p {
            color: #666;
            line-height: 1.8;
        }
        
        /* Product Cards */
        .product-card {
            background: white;
            border-radius: 15px;
            overflow: hidden;
            margin-bottom: 30px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
        }
        
        .product-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }
        
        .product-image {
            width: 100%;
            height: 250px;
            object-fit: cover;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .product-body {
            padding: 20px;
        }
        
        .product-name {
            font-size: 1.3rem;
            font-weight: bold;
            color: #333;
            margin-bottom: 10px;
        }
        
        .product-info {
            color: #666;
            margin-bottom: 5px;
        }
        
        .product-badge {
            display: inline-block;
            padding: 5px 15px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 20px;
            font-size: 0.9rem;
            margin-top: 10px;
        }
        
        /* Gallery */
        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 15px;
            margin-bottom: 30px;
            cursor: pointer;
        }
        
        .gallery-item img {
            width: 100%;
            height: 300px;
            object-fit: cover;
            transition: transform 0.5s ease;
        }
        
        .gallery-item:hover img {
            transform: scale(1.1);
        }
        
        .gallery-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(102, 126, 234, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .gallery-item:hover .gallery-overlay {
            opacity: 1;
        }
        
        .gallery-overlay i {
            color: white;
            font-size: 3rem;
        }
        
        /* News Cards */
        .news-card {
            background: white;
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 20px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
        }
        
        .news-card:hover {
            transform: translateX(10px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }
        
        .news-title {
            font-size: 1.2rem;
            font-weight: bold;
            color: #333;
            margin-bottom: 10px;
        }
        
        .news-date {
            color: #999;
            font-size: 0.9rem;
            margin-bottom: 10px;
        }
        
        .news-content {
            color: #666;
            line-height: 1.8;
        }
        
        /* Footer */
        .farm-footer {
            background: rgba(0, 0, 0, 0.5);
            color: white;
            padding: 40px 0;
            margin-top: 80px;
        }
        
        .footer-content {
            text-align: center;
        }
        
        .footer-content h5 {
            margin-bottom: 20px;
        }
        
        .footer-links {
            list-style: none;
            padding: 0;
        }
        
        .footer-links li {
            margin-bottom: 10px;
        }
        
        .footer-links a {
            color: white;
            text-decoration: none;
            transition: color 0.3s;
        }
        
        .footer-links a:hover {
            color: #667eea;
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-light fixed-top">
        <div class="container">
            <a class="navbar-brand" href="#">
                <i class="fas fa-leaf"></i> 智慧农业
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ms-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="#about">关于我们</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#products">优质产品</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#gallery">农场风采</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#news">最新动态</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link btn btn-primary text-white ms-2" href="/index">
                            <i class="fas fa-home"></i> 返回系统
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <!-- Hero Section -->
    <div class="hero-section">
        <div class="container">
            <h1>🌾 欢迎来到智慧农场 🌾</h1>
            <p>科技引领农业未来，智慧创造绿色生活</p>
            <a href="#products" class="btn btn-light btn-lg">
                <i class="fas fa-shopping-basket"></i> 探索产品
            </a>
        </div>
    </div>

    <!-- About Section -->
    <section id="about" class="py-5">
        <div class="container">
            <div class="section-title">
                <h2>🏛️ 关于我们</h2>
                <p>致力于打造现代化智慧农场</p>
            </div>
            <div class="row">
                <div class="col-md-4">
                    <div class="feature-card">
                        <div class="feature-icon">
                            <i class="fas fa-tractor"></i>
                        </div>
                        <h4>现代化管理</h4>
                        <p>采用先进的智慧农业管理系统，实现种植、生产、销售全流程数字化管理，提升农场运营效率。</p>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="feature-card">
                        <div class="feature-icon">
                            <i class="fas fa-leaf"></i>
                        </div>
                        <h4>绿色有机</h4>
                        <p>坚持绿色种植理念，使用有机肥料，不使用化学农药，为消费者提供健康、安全的优质农产品。</p>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="feature-card">
                        <div class="feature-icon">
                            <i class="fas fa-chart-line"></i>
                        </div>
                        <h4>科技赋能</h4>
                        <p>运用物联网、大数据、人工智能等技术，实时监测作物生长状态，科学决策，提高产量和品质。</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Products Section -->
    <section id="products" class="py-5">
        <div class="container">
            <div class="section-title">
                <h2>🎁 优质产品</h2>
                <p>新鲜健康，品质保证</p>
            </div>
            <div class="row">
                <div th:if="${productList != null and !productList.isEmpty()}">
                    <div class="col-md-4" th:each="product : ${productList}">
                        <div class="product-card">
                            <div class="product-image">
                                <img th:if="${product.image != null and product.image != ''}" 
                                     th:src="${product.image}" 
                                     alt="产品图片"
                                     style="width: 100%; height: 250px; object-fit: cover;">
                                <div th:if="${product.image == null or product.image == ''}" 
                                     style="width: 100%; height: 250px; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: white;">
                                    <i class="fas fa-image"></i>
                                </div>
                            </div>
                            <div class="product-body">
                                <div class="product-name" th:text="${product.productName}">产品名称</div>
                                <div class="product-info">
                                    <i class="fas fa-tag"></i> 
                                    编号: <span th:text="${product.productCode}">编号</span>
                                </div>
                                <div class="product-info">
                                    <i class="fas fa-box"></i> 
                                    库存: <span th:text="${product.quantity}">0</span> 
                                    <span th:text="${product.unit}">单位</span>
                                </div>
                                <div class="product-info" th:if="${product.suggestedPrice != null}">
                                    <i class="fas fa-dollar-sign"></i> 
                                    价格: ¥<span th:text="${product.suggestedPrice}">0</span>/<span th:text="${product.unit}">单位</span>
                                </div>
                                <span class="product-badge">
                                    <i class="fas fa-certificate"></i> 绿色认证
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
                <div th:if="${productList == null or productList.isEmpty()}" class="col-12">
                    <div class="text-center text-white">
                        <i class="fas fa-box-open fa-3x mb-3"></i>
                        <p>暂无产品信息</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Gallery Section -->
    <section id="gallery" class="py-5">
        <div class="container">
            <div class="section-title">
                <h2>📷 农场风采</h2>
                <p>记录美好时光</p>
            </div>
            <div class="row">
                <div class="col-md-4">
                    <div class="gallery-item">
                        <img src="https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=600" alt="农场景观1">
                        <div class="gallery-overlay">
                            <i class="fas fa-search-plus"></i>
                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="gallery-item">
                        <img src="https://images.unsplash.com/photo-1574943320219-553eb213f72d?w=600" alt="农场景观2">
                        <div class="gallery-overlay">
                            <i class="fas fa-search-plus"></i>
                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="gallery-item">
                        <img src="https://images.unsplash.com/photo-1625246333195-78d9c38ad449?w=600" alt="农场景观3">
                        <div class="gallery-overlay">
                            <i class="fas fa-search-plus"></i>
                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="gallery-item">
                        <img src="https://images.unsplash.com/photo-1560493676-04071c5f467b?w=600" alt="农场景观4">
                        <div class="gallery-overlay">
                            <i class="fas fa-search-plus"></i>
                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="gallery-item">
                        <img src="https://images.unsplash.com/photo-1464226184884-fa280b87c399?w=600" alt="农场景观5">
                        <div class="gallery-overlay">
                            <i class="fas fa-search-plus"></i>
                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="gallery-item">
                        <img src="https://images.unsplash.com/photo-1472214103451-9374bd1c798e?w=600" alt="农场景观6">
                        <div class="gallery-overlay">
                            <i class="fas fa-search-plus"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- News Section -->
    <section id="news" class="py-5">
        <div class="container">
            <div class="section-title">
                <h2>📰 最新动态</h2>
                <p>了解农场最新资讯</p>
            </div>
            <div class="row">
                <div class="col-md-6" th:if="${newsList != null and !newsList.isEmpty()}">
                    <div class="news-card" th:each="news : ${newsList}">
                        <div class="news-title" th:text="${news.title}">新闻标题</div>
                        <div class="news-date">
                            <i class="fas fa-calendar-alt"></i>
                            <span th:text="${#temporals.format(news.publishTime, 'yyyy-MM-dd HH:mm')}">发布时间</span>
                        </div>
                        <div class="news-content" th:text="${news.summary}">新闻摘要内容...</div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="feature-card" style="height: 100%;">
                        <div class="feature-icon">
                            <i class="fas fa-phone-alt"></i>
                        </div>
                        <h4>联系我们</h4>
                        <p><i class="fas fa-map-marker-alt"></i> 地址：某省某市某县智慧农场基地</p>
                        <p><i class="fas fa-phone"></i> 电话：400-123-4567</p>
                        <p><i class="fas fa-envelope"></i> 邮箱：info@smartfarm.com</p>
                        <p><i class="fas fa-clock"></i> 营业时间：周一至周日 8:00-18:00</p>
                        <div class="mt-4">
                            <a href="#" class="btn btn-primary me-2">
                                <i class="fab fa-weixin"></i> 微信
                            </a>
                            <a href="#" class="btn btn-success">
                                <i class="fab fa-weibo"></i> 微博
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer class="farm-footer">
        <div class="container">
            <div class="row">
                <div class="col-md-4 footer-content">
                    <h5><i class="fas fa-leaf"></i> 智慧农场</h5>
                    <p>科技引领农业未来</p>
                </div>
                <div class="col-md-4 footer-content">
                    <h5>快速链接</h5>
                    <ul class="footer-links">
                        <li><a href="#about">关于我们</a></li>
                        <li><a href="#products">优质产品</a></li>
                        <li><a href="#gallery">农场风采</a></li>
                        <li><a href="#news">最新动态</a></li>
                    </ul>
                </div>
                <div class="col-md-4 footer-content">
                    <h5>关注我们</h5>
                    <div>
                        <a href="#" class="text-white me-3"><i class="fab fa-weixin fa-2x"></i></a>
                        <a href="#" class="text-white me-3"><i class="fab fa-weibo fa-2x"></i></a>
                        <a href="#" class="text-white"><i class="fab fa-qq fa-2x"></i></a>
                    </div>
                </div>
            </div>
            <hr class="bg-white my-4">
            <div class="text-center">
                <p>&copy; 2024 智慧农业信息管理系统. All rights reserved.</p>
            </div>
        </div>
    </footer>

    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
    <script>
        // 平滑滚动
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                const target = document.querySelector(this.getAttribute('href'));
                if (target) {
                    target.scrollIntoView({
                        behavior: 'smooth',
                        block: 'start'
                    });
                }
            });
        });
    </script>
</body>
</html>

